package com.jiaai.cloud.system.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author 佳爱网络科技
 * @since 2017-08-24
 */
@TableName("t_sys_user")
public class TSysUser extends Model<TSysUser> {

    private static final long serialVersionUID = 1L;

    /**
     * 平台用户Id
     */
	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
	private Integer roleId;
    /**
     * 用户姓名
     */
	private String vsername;
    /**
     * 用户密码
     */
	private String password;
    /**
     * 登录昵称
     */
	@TableField("loginName")
	private String loginName;
    /**
     * 手机号
     */
	private String mobile;
    /**
     * 电子邮箱
     */
	private String email;
    /**
     * 创建时间
     */
	@JSONField(format = "YYYY-MM-dd")
	private Date creatTime;
    /**
     * 登录时间
     */
	@JSONField(format = "YYYY-MM-dd")
	private Date loginTime;
    /**
     * 最后一次登录时间
     */
	@JSONField(format = "YYYY-MM-dd")
	private Date lastLoginTime;
    /**
     * 登录次数
     */
	private Integer count;


	@TableField(exist = false)
	private List<TRole> roleList;

	public List<TRole> getRoleList() {
		return roleList;
	}

	public void setRoleList(List<TRole> roleList) {
		this.roleList = roleList;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	public String getVsername() {
		return vsername;
	}

	public void setVsername(String vsername) {
		this.vsername = vsername;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Date getCreatTime() {
		return creatTime;
	}

	public void setCreatTime(Date creatTime) {
		this.creatTime = creatTime;
	}

	public Date getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
